
package jfpal.monitor.server;

import de.codecentric.boot.admin.config.EnableAdminServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.core.env.Environment;

/**
 * @author LIJIKAI
 * @Description: 服务监控
 * @date 2017年7月24日
 */
@SpringBootApplication
@EnableEurekaClient
@EnableAdminServer
public class SpringBootAdminApplication {
    public static void main(String[] args) {
        SpringApplication.run(SpringBootAdminApplication.class, args);
    }

    @Autowired
    void setEnviroment(Environment env) {
        System.out.println("my-config.appName from env: "
                + env.getProperty("my-config.appName"));
    }
}
